package com.mybatis.jpa.statement.builder;

import com.mybatis.jpa.meta.PersistentMeta;
import com.mybatis.jpa.statement.MybatisStatementAdapter;

import javax.persistence.OrderBy;
import java.lang.reflect.Method;

/**
 * 描述
 *
 * @ProjectName: framework_v2_idea2
 * @Package: com.mybatis.jpa.statement.builder
 * @ClassName: SelectNestedForOrderByBuilder
 * @Author: JackWang
 * @CreateDate: 2018/11/28 0028 15:11
 * @UpdateUser: JackWang
 * @UpdateDate: 2018/11/28 0028 15:11
 * @Version: 1.0
 */
public class SelectNestedForOrderByBuilder extends SelectNestedBuilder{

    @Override
    public String getOrderByInfo(MybatisStatementAdapter adapter, PersistentMeta persistentMeta, Method method){
        return " <if test=\"orderBy!=null and orderBy!='' \">ORDER BY ${orderBy}</if>";
    }
}
